/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package assisisw.smartcal.entitysubsystem.exceptions.calendar;

import assisisw.smartcal.entitysubsystem.Calendar;
import assisisw.smartcal.entitysubsystem.User;

/**
 *
 * @author Francesco
 */
public class CalendarDoubleSharingNotAllowedException extends CalendarException 
{

    // Instance Fields
    
    /***/
    private User userDesignedForDoubleSharing ;
    
    // Instance Methods

    /**
     * @param calendar 
     * @param userDesignedForDoubleSharing 
     */
    public CalendarDoubleSharingNotAllowedException ( Calendar calendar , User userDesignedForDoubleSharing ) 
    {
        super ( calendar ) ;
        if ( userDesignedForDoubleSharing != null )
            this.userDesignedForDoubleSharing = userDesignedForDoubleSharing ;
        else
            throw new IllegalArgumentException () ;
    }
    
    /**
     * @return
     */
    public User getUserDesignedForDoubleSharing () 
    {
        return userDesignedForDoubleSharing ;
    }
    
}
